{% extends 'base.html' %}
{% block title %}
    宇宙的尽头，是熵寂...
{% endblock %}
{% block style %}
    <style>
        #container {
            width: 900px;
            margin: 0 auto;
        }

        .article {
            width: 800px;
            background-color: aliceblue;
            height: 400px;
            margin-bottom: 20px;
            border-bottom: 1px solid gray;
        }
    </style>
{% endblock %}
{% block content %}
    <div class="col-md-5 col-md-offset-5">
        <nav aria-label="Page navigation">
            <ul class="pagination">
{#                <li>#}
{#                    <a href="#" aria-label="Previous">#}
{#                        <span aria-hidden="true">&laquo;</span>#}
{#                    </a>#}
{#                </li>#}
                {% for i in range(1,articleNum//5 + 2) %}
                    <li><a href="{{ url_for('user.mainPage') }}?page={{ i }}">{{ i }}</a></li>
                {% endfor %}
{#                <li>#}
{#                    <a href="#" aria-label="Next">#}
{#                        <span aria-hidden="true">&raquo;</span>#}
{#                    </a>#}
{#                </li>#}
            </ul>
        </nav>
    </div>
    <div id="container">
        {% for article in articles %}
            <div class="article">
                <p><a href=""></a>
                <h1><a href="{{ url_for('article.articleDetail') }}?articleId={{ article[0] }}">{{ article[2] }}</a></h1>
                <p>{{ article[5] | decodeLite | safe }}</p>
                <p>{{ article[6] }}</p>
            </div>
        {% endfor %}
    </div>
{% endblock %}